{/*
* @author 艾格林门信息服务（大连）有限公司
* @copyright 2015 - present
* @license GPL v3
*/}
<layout name="layout" />

<script src="{$uri}Public/Scripts/PSI/CodeTable/Runtime/MainForm.js?dt={$dtFlag}" type="text/javascript"></script>

<script src="{$uri}Public/Scripts/PSI/CodeTable/Runtime/EditForm.js?dt={$dtFlag}" type="text/javascript"></script>

{/* 系统数据字典自定义字段 */}
<script src="{$uri}Public/Scripts/PSI/SysDict/SysDictField.js?dt={$dtFlag}" type="text/javascript"></script>

{/*
上级字段
TODO：因为不是每个码表都是层级结构，所以这个地方需要优化一下JS的冗余引用
*/}
<script src="{$uri}Public/Scripts/PSI/CodeTable/Runtime/CodeTableParentIdField.js?dt={$dtFlag}"
  type="text/javascript"></script>

{/*
码表记录引用字段
TODO：这个地方需要优化一下JS的冗余引用
*/}
<script src="{$uri}Public/Scripts/PSI/CodeTable/Runtime/CodeTableRecordRefField.js?dt={$dtFlag}"
  type="text/javascript"></script>

{/*
编辑数据域
*/}
<script src="{$uri}Public/Scripts/PSI/User/SelectUserDataOrg.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/CodeTable/Runtime/EditDataOrgForm.js?dt={$dtFlag}"
  type="text/javascript"></script>

{/*
编辑助记码
*/}
<script src="{$uri}Public/Scripts/PSI/CodeTable/Runtime/EditPyForm.js?dt={$dtFlag}"
  type="text/javascript"></script>

<script>
  PCL.onReady(() => {
    const app = PCL.create("PSI.App", {
      userName: "{$loginUserName}",
      productionName: "{$productionName}",
      appHeaderInfo: {
        title: "{$title}"
      }
    });

    app.add(PCL.create("PSI.CodeTable.Runtime.MainForm", {
      fid: "{$fid}",
      pDesignTool: "{$pDesignTool}"
    }));
  });
</script>
